home *** CD-ROM | disk | FTP | other *** search
- /*
- * File: ControlStrip.h
- *
- * Abstract: Interface file for building ControlStrip modules. The defines
- * were snagged from the developer's note but the dispatch codes
- * for the ControlStrip trap were "discovered" using MacsBug.
- *
- * References: See the Powerbook 500 series developers note on the
- * June developer CD.
- *
- * History: RSM 94-06-13 Created from scratch.
- * SA 94-06-29 Added the rest of the dispatch codes.
- *
- * Author: Robert S Mah <rmah@panix.com>
- * Sigurdur Asgeirsson <sigurasg@rhi.hi.is>
- *
- * ©1994 Me and SA, until Apple Computer, Inc. releases the official file
- */
-
- #pragma once
- #ifndef __CONTROLSTRIP__
- #define __CONTROLSTRIP__
-
- #ifndef __DIALOGS__
- #include <Dialogs.h>
- #endif
-
- #ifndef __MENUS__
- #include <Menus.h>
- #endif
-
-
- // Gestalt stuff
-
- #define gestaltControlStripAttr 'sdev' // a bit mask
- #define gestaltControlStripExists 0 // bit 0, mask is 0x0001
-
- #define gestaltControlStripVersion 'sdvr' // same as first 4 bytes in
- // a 'vers' resource
-
-
- // messages to the 'sdev' code resource
-
- enum{
- sdevInitModule = 0,
- sdevCloseModule,
- sdevFeatures,
- sdevGetDisplayWidth,
- sdevPeriodicTickle,
- sdevDrawStatus,
- sdevMouseClick,
- sdevSaveSettings,
- sdevShowBalloonHelp
- };
-
-
- // return results for sdevFeatures
-
- enum{
- sdevWantMouseClicks = (0x01 << 0),
- sdevDontAutoTrack = (0x01 << 1),
- sdevHasCustomHelp = (0x01 << 2),
- sdevKeepModuleLocked = (0x01 << 3)
- };
-
-
- // return results for sdevPeriodicTickle and sdevMouseClick
-
- enum{
- sdevResizeDisplay = (0x01 << 0),
- sdevNeedToSave = (0x01 << 1),
- sdevHelpStateChanged = (0x01 << 2),
- sdevCloseNow = (0x01 << 3)
- };
-
-
- // Defines for SBDrawBarGraph()
-
- #define BarGraphSlopeLeft -1 // max end of sloping graph is on left
- #define BarGraphFlatRight 0 // max end of flat graph is on right
- #define BarGraphSlopeRight 1 // max end of sloping graph is on right
-
-
- // typedef for control strip procedures
-
- pascal long (*ControlStripProcPtr)( long message,
- long params,
- Rect *statusRect,
- GrafPtr statusPort );
-
-
- #if __cplusplus
- extern "C" {
- #endif
-
- pascal Boolean
- SBControlStripVisible( void )
- = { 0x303C, 0x0000, 0xAAF2 };
-
- pascal Boolean
- SBShowHideControlStrip( Boolean showIt )
- = { 0x303C, 0x0101, 0xAAF2 };
-
- pascal Boolean
- SBSafeToAccessStartupDisk( void )
- = { 0x303C, 0x0002, 0xAAF2 };
-
- pascal short
- SBOpenModuleResourceFile( OSType fileCreator )
- = { 0x303C, 0x0203, 0xAAF2 };
-
- pascal OSErr
- SBLoadPreferences( ConstStr255Param rsrcName, Handle *prefsH )
- = { 0x303C, 0x0404, 0xAAF2 };
-
- pascal OSErr
- SBSavePreferences( ConstStr255Param rsrcName, Handle prefsH )
- = { 0x303C, 0x0405, 0xAAF2 };
-
- pascal short
- SBGetDetachedIndString( StringPtr dst, Handle strH, short idx )
- = { 0x303C, 0x0506, 0xAAF2 };
-
- pascal OSErr
- SBGetDetachIconSuite( Handle *suiteH, short resID, unsigned long )
- = { 0x303C, 0x0507, 0xAAF2 };
-
- pascal short
- SBTrackPopupMenu( const Rect *moduleRect, MenuHandle )
- = { 0x303C, 0x0408, 0xAAF2 };
-
- pascal short
- SBTrackSlider( const Rect*, short nTicks, short initVal )
- = { 0x303C, 0x0409, 0xAAF2 };
-
- pascal OSErr
- SBShowHelpString( const Rect*, StringPtr helpStr )
- = { 0x303C, 0x040A, 0xAAF2 };
-
- pascal short
- SBGetBarGraphWidth( short barCount )
- = { 0x303C, 0x010B, 0xAAF2 };
-
- pascal void
- SBDrawBarGraph( short level, short barCount, short direction, Point topLeft )
- = { 0x303C, 0x050C, 0xAAF2 };
-
- pascal short
- SBModalDialogInContext( ModalFilterProcPtr, short *item )
- = { 0x303C, 0x040D, 0xAAF2 };
-
-
-
- #if __cplusplus
- }
- #endif
-
-
- #endif
-
-